<?php


namespace app\operater\model;


use think\Model;

class Order extends Model
{
    //    1=未付款 2=已付款 3=部分付款 4=部分退款 5=已退款',
    public static function payStatus($pay_status){
        switch($pay_status){
            case 1:
                $pay_status = "未付款";
                break;
            case 2:
                $pay_status = "已付款";
                break;
            case 3:
                $pay_status = "部分付款";
                break;
            case 4:
                $pay_status = "部分退款";
                break;
            case 5:
                $pay_status = "已退款";
                break;
        }
        return $pay_status;
    }
//    发货状态 1=未发货 2=部分发货 3=已发货 4=部分退货 5=已退货',
    public static function shipStatus($ship_status)
    {
        switch($ship_status){
            case 1:
                $ship_status = "未发货";
                break;
            case 2:
                $ship_status = "部分发货";
                break;
            case 3:
                $ship_status = "已发货";
                break;
            case 4:
                $ship_status = "部分退货";
                break;
            case 5:
                $ship_status = "已退货";
                break;
        }
        return $ship_status;
    }
//订单状态 1=正常 2=完成 3=取消
    public static function status($status)
    {
        switch($status){
            case 1:
                $status = "正常";
                break;
            case 2:
                $status = "完成";
                break;
            case 3:
                $status = "取消";
                break;
        }
        return $status;
    }
//    `order_type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '订单类型，1是普通订单，2是拼团订单',
    public static function orderType($order_type)
    {
        switch($order_type){
            case 1:
                $order_type = "正常";
                break;
            case 2:
                $order_type = "完成";
                break;
            case 3:
                $order_type = "取消";
                break;
        }
        return $order_type;
    }
//      `tax_type` tinyint(1) unsigned DEFAULT '1' COMMENT '是否开发票 1=不发票 2=个人发票 3=公司发票',
    public static function taxType($tax_type)
    {
        switch($tax_type){
            case 1:
                $tax_type = "不开发票";
                break;
            case 2:
                $tax_type = "个人发票";
                break;
            case 3:
                $tax_type = "公司发票";
                break;
        }
        return $tax_type;
    }
}